colorscale: Avoid invalid write
authorTimm Bäder <mail@baedert.org>
Mon, 17 Oct 2016 16:34:07 +0000 (18:34 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 17 Oct 2016 16:47:16 +0000 (18:47 +0200)
gtk/gtkcolorscale.c

index 78154551f17279408d7f67c86dc41eba668b08e7..e1bf973f61e18b50d16401e7953bab49a609e96f 100644 (file)
@@ -106,7 +106,7 @@ gtk_color_scale_draw_trough (GtkColorScale  *scale,
               red = CLAMP (r * 255, 0, 255);
               green = CLAMP (g * 255, 0, 255);
               blue = CLAMP (b * 255, 0, 255);
-              p[x] = (red << 16) | (green << 8) | blue;
+              p[hue_x] = (red << 16) | (green << 8) | blue;
             }
         }